# Maintainer: Fabian Bornschein <fabiscafe-at-mailbox-dot-org>
# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgname=gnome-session
pkgver=45.0
pkgrel=1
pkgdesc="The GNOME Session Handler"
url="https://gitlab.gnome.org/GNOME/gnome-session"
arch=(loong64 x86_64)
license=(GPL)
depends=(
  dconf
  gnome-desktop
  gsettings-desktop-schemas
  json-glib
  libgl
  libsm
  libxtst
  systemd
)
makedepends=(
  docbook-xsl
  git
  gtk-doc
  mesa
  meson
  python
  xmlto
  xtrans
)
groups=(gnome)
_commit=998ed1d8ee2ff5396583c284230648625b4103e5  # tags/45.0^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-session.git#commit=$_commit")
b2sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/\.beta/beta/;s/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}

# vim:set sw=2 sts=-1 et:
